package com.example.getaudit.common.exception;

import com.example.getaudit.common.result.IResultEnum;
import lombok.Getter;

import java.io.Serial;

/**
 * <p>业务异常</p>
 * <p>业务处理时，出现异常，可以抛出该异常</p>
 *
 * @since 2019/5/2
 */
@Getter
public class BusinessException extends CommonException {
    @Serial
    private static final long serialVersionUID = 1L;

    public BusinessException(IResultEnum iResultEnum) {
        super(iResultEnum);
    }

    public BusinessException(String msg) {
        super(ExceptionCodeEnum.ERROR.getCode(), msg);
    }

    public BusinessException(Integer code, String msg) {
        super(code, msg);
    }

    public BusinessException(IResultEnum iResultEnum, Throwable throwable) {
        super(iResultEnum, throwable);
    }
}
